/**
 * 〈〉
 *
 * @author 王青杰
 * @create 2018-08-0810:26
 * @since 1.0.0
 */
package org.wlgzs.website.wlgzsoffice.controller.assess;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;
import org.wlgzs.website.wlgzsoffice.entity.TbGrade;
import org.wlgzs.website.wlgzsoffice.service.GradeService;
import org.wlgzs.website.wlgzsoffice.util.ResultMsg;

import javax.annotation.Resource;

@RestController
@RequestMapping("assess/grade")
public class GradeController {
    @Resource
    GradeService gradeService;
    @RequestMapping(value = "/insert",method = RequestMethod.POST)
    public ResultMsg insert(TbGrade grade){
        return gradeService.insert(grade);
    }
    @RequestMapping(value = "/delete",method = RequestMethod.POST)
    public ResultMsg delete(int gradeId){
        return gradeService.delete(gradeId);
    }
    @RequestMapping (value = "/update",method = RequestMethod.POST)
    public ResultMsg update(TbGrade tbGrade){
        return gradeService.update(tbGrade);
    }
    @RequestMapping(value = "/check")
    public ResultMsg check(int pageNum,TbGrade grade){
        return gradeService.check(pageNum,grade);
    }



}
